home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-2.iso / os2 / wsec204e.zip / WPSSETUP.CMD < prev   
OS/2 REXX Batch file  |  1995-06-17  |  4KB  |  122 lines

  1. /******************************************************************/
  2. /* WPSSETUP.CMD Workplace Security Settings Utility               */
  3. /*                                                                */
  4. /*                                                                */
  5. /*  Function:  Automates Workplace Security Settings.             */
  6. /*                                                                */
  7. /*             Tailor this Rexx command script to                 */
  8. /*             meet your needs. See the User Guide                */
  9. /*             for information on the setup string                */
  10. /*             keywords.                                          */
  11. /*                                                                */
  12. /*                                                                */
  13. /*  Note: This utility requires the master password to            */
  14. /*        change an objects security settings. Therefore,         */
  15. /*        it will only work after the product has been            */
  16. /*        registered and a master password has been set.          */
  17. /*                                                                */
  18. /*                                                                */
  19. /*                                                                */
  20. /* Workplace Security Copyright (C) 1995 by Maple Valley Software */
  21. /******************************************************************/
  22.   
  23. '@Echo Off'
  24.  
  25. /* Load REXXUTIL */
  26.  
  27. Call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
  28. Call SysLoadFuncs
  29.  
  30. /* Initialize */
  31.  
  32. Signal On Failure Name FAILURE
  33. Signal On Halt Name HALT
  34. Signal On Syntax Name SYNTAX
  35.  
  36. Call SysCls          /* clear the screen */
  37. Say ' '
  38. Say ' '
  39. Say ' '
  40. Say ' '
  41. Say ' '
  42. Say ' '
  43. Say 'WPSECURE: Enter the Master password '
  44. parse upper pull master .
  45. Call SysCls          /* clear the screen */
  46. Say ' '
  47. Say ' '
  48. Say ' '
  49. Say ' '
  50. Say ' '
  51. Say ' '
  52.  
  53. Say 'WPSECURE: Enter the new object password'
  54. parse upper pull password .
  55. Call SysCls
  56.  
  57. ObjectID = '<WP_DESKTOP>'  /* Set the Desktop password settings */
  58. MenuItems = "REFRESHMENUITEM=YES;SHUTDOWNMENUITEM=YES;LOCKUPMENUITEM=YES;LOCKOUTMENUITEM=YES;MASTERACCESS=NO;"
  59. Settings = Menuitems||"LOCK=YES;LOCKOUT=NO;REMAINLOCKED=YES;PROTECT=YES;PASSWORD="password";LOCKICON=YES;LOCKTEXT=NO;MASTER="master";"
  60. Result = SysSetObjectData(ObjectID, Settings )
  61. if Result = 0 then signal Object_Settings_error
  62.  
  63. ObjectID = '<WP_OS2SYS>'  /* Set the OS/2 System folder settings */
  64. Settings = "LOCK=YES;AUTOLOCK=YES;PROTECT=YES;PASSWORD="password";LOCKICON=YES;LOCKTEXT=NO;MASTER="master";"
  65. Result = SysSetObjectData(ObjectID, Settings )
  66. if Result = 0 then signal Object_Settings_error
  67.  
  68. ObjectID = '<WP_CONFIG>'  /* Set the System Setup folder settings */
  69. Settings = "LOCK=YES;AUTOLOCK=YES;PROTECT=NO;PASSWORD="password";LOCKICON=YES;LOCKTEXT=NO;MASTER="master";"
  70. Result = SysSetObjectData(ObjectID, Settings )
  71. if Result = 0 then signal Object_Settings_error
  72.  
  73. ObjectID = '<WP_DRIVES>'  /* Set the Drives folder settings */
  74. Settings = "LOCK=YES;AUTOLOCK=YES;REMOVEMENUITEMS=YES;PASSWORD="passord";LOCKICON=NO;LOCKTEXT=YES;MASTER="master";"
  75. Result = SysSetObjectData(ObjectID, Settings )
  76. if Result = 0 then signal Object_Settings_error
  77.  
  78. ObjectID = '<WP_PROMPTS>' /* Set the Command Prompts folder settings */
  79. Settings = "LOCK=YES;AUTOLOCK=YES;PROTECT=NO;PASSWORD="password";LOCKICON=YES;LOCKTEXT=NO;MASTER="master";"
  80. Result = SysSetObjectData(ObjectID, Settings )
  81. if Result = 0 then signal Object_Settings_error
  82.  
  83. Call SysCls          /* clear the screen */
  84. Say ' '
  85. Say ' '
  86. Say ' '
  87. Say ' '
  88. Say ' '
  89. Say ' '
  90. Say 'WPSECURE: WPSSETUP complete'
  91. Signal DONE
  92.  
  93. Object_settings_error:
  94. Call SysCls          /* clear the screen */
  95. Say ' '
  96. Say ' '
  97. Say ' '
  98. Say ' '
  99. Say ' '
  100. Say ' '
  101. Say 'Error changing settings for ObjectID='ObjectID'. Possible reasons:'
  102. Say '=> Master password is incorrect'
  103. Say '=> Object ID does not exist'
  104. Say '=> Workplace Security has not been registered.' 
  105.  
  106. Signal DONE 
  107.  
  108. FAILURE:
  109. Say 'REXX failure.'
  110. Signal DONE
  111.  
  112. HALT:
  113. Say 'REXX halt.'
  114. Signal DONE
  115.  
  116. SYNTAX:
  117. Say 'REXX syntax error.'
  118. Signal DONE
  119.  
  120. DONE:
  121. Exit
  122.